* Replication code for Figures 1 and 2 of "A Computational Model for Identifying Delegating and Constraining Provisions in European Union Laws"
* Fabio Franchino, Marta Migliorati, Giovanni Pagano and Valerio Vignoli
* European Union Politics

version 18
clear all
use dataset.dta

graph set window fontface "Verdana"

***************  Figure A2: Mean differences in discretion ratio between directives and regulations
* T-test of equality of means (unequal variance)
ttest discr_ms_r, by(act) unequal
gen diff_mean =  2.1249 in 1
gen ci_l = 1.944391 in 1
gen ci_u = 2.30541 in 1

ttest discr_nca_r, by(act) unequal
replace diff_mean = .2189904 in 2
replace ci_l = .1597655 in 2
replace ci_u = .2782152 in 2

ttest discr_com_r, by(act) unequal
replace diff_mean = -.5007384 in 3
replace ci_l = -.6687733 in 3
replace ci_u = -.3327035 in 3

ttest discr_age_r, by(act) unequal
replace diff_mean = -.0910715 in 4
replace ci_l = -.11839 in 4
replace ci_u = -.063753 in 4

gen p_id = _n in 1/4

eclplot diff_mean ci_l ci_u p_id in 1/4, hor estopts(msize(small) color(black)) rplottype(rspike) ciopts(msize(small) color(black)) graphregion(fcolor(white)) xtitle("Mean differences in discretion ratio", size(3.5)) ytitle("", size(3.5)) xlabel(-1 "-1" 0 "0" 1 "1" 2 "2" 3 "3", noticks nogrid labsize(3)) ylabel(1 "Member" 1.2 "States" 1.9 "National" 2.1 "authorities" 3 "Commission" 3.8 "Supranational" 4 "agencies", noticks nogrid labsize(3)) xline(0, lp(dash)) yscale(lc(white)) saving(Figure_A2, replace)

graph export "Figure_A2.png", as(png) name("Graph") replace

graph set window fontface default

